package com.mef.smsplat.dao;


import java.util.List;

import org.springframework.stereotype.Repository;

import com.cqcis.base.orm.jdbc.BaseJdbcDao;
import com.mef.smsplat.dao.base.BaseSpringJdbcDao;
import com.mef.smsplat.domain.TempLabelInfoDomain;


@Repository
public class TempLabelInfoDao extends BaseSpringJdbcDao<TempLabelInfoDomain, String> {
	

	@Override
	public BaseJdbcDao getDaoClass() {
		return this;
	}

	@Override
	public Class getEntityClass() {
		return TempLabelInfoDomain.class;
	}
	
	/**
	 * 根据模版查询其标签
	 * @param templateId
	 * @return
	 */
	public List<TempLabelInfoDomain> query(String templateId){
		String sql="select * from temp_label_info t where t.template_Id=?";
		return super.query(sql, new Object[]{templateId});
	}
	
	/**
	 * 根据模版删除标签
	 * @param templateId
	 */
	public void delete(String templateId){
		String sql="delete from temp_label_info where template_Id=?";
		super.exeSql(sql, new Object[]{templateId});
	}

}
